In order to run peripheral applications in a processing system, the operating system must be capable of interfacing with a plurality of applications. The operating system typically employs peripheral devices referred to as network controllers to facilitate the interfacing. An interface layer generally exists between the operating system and the peripheral device. The portion of the interface layer dedicated to communication with the peripheral device typically comprises the device driver. The device driver controls and communicates with the network controller or peripheral device. It is a special subroutine written for each peripheral device. The device driver also provides information to the hardware which determines when to transmit packets of information to the peripherals.
A device driver is typically structured in layers. The upper layers of the device driver are generally dedicated to communication with the operating system and network protocols. The lower layers of the device driver are usually dedicated to interfacing with hardware, such as the network controller or other peripheral device. The network controller then sends the information onto a media of some type, for example, a wire or the like. It is important to send such data information onto a media in as efficient manner as possible to enhance the performance thereof.
The basic system for transmitting a packet of information onto a media uses its memory to store packets until the time of transmission. Since the speed of data transfer to the media is very slow compared to the CPU speed, an information transfer bottleneck occurs. This bottleneck causes the system to use much of its memory in storing the data packets. There are two conventional approaches to solving this problem. The first approach is referred to as the double copy approach. The second approach is referred to as the scatter gather approach. Each of these approaches will be discussed below.
In the conventional double-copy approach, a small number of local buffers for holding data packets are received from the main memory of the processing system in a preallocated arrangement. The local buffers then send the packets to the media in a preallocated fashion. When the local buffers are full, any additional packets of information intended to be sent to the media are typically held in a queue within the data processing system to await the availability of one of the local buffers. A timer is generally used to determine whether a local buffer is available by checking the local buffers at the end of a given period, typically about every 10 milliseconds. Since this time period is considerably longer than the time the system takes to transmit a packet from the local buffer to the media, much time is wasted and the system is inefficient.
The second conventional approach, referred to as the scatter-gather approach, utilizes a virtual memory to hold packet information to be transmitted. Although this approach avoids the use of a timer, it still can waste time when the amount of virtual memory needed becomes large. Whenever virtual memory is used, the data processing system must perform a virtual to physical address conversion. As the amount of virtual memory employed increases, the time spent on performing the virtual to physical address conversion increases, and the system becomes correspondingly less efficient.
As can be seen, the above-identified systems waste time and therefore affects the efficiency of the system. It is important in a data processing system to provide as efficient transmission of data as possible. It is also important that an improvement in efficiency should not add significant complexity and expense to such a system. Accordingly, what is needed is a system and method for fast transmission of data information in a data processing system in which the delays inherent in conventional systems are significantly reduced. The present invention addresses such a need.